home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / lib / mozilla-firefox / include / jar / zipstub.h < prev   
C/C++ Source or Header  |  2006-05-08  |  4KB  |  121 lines

  1. /* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  2. /* ***** BEGIN LICENSE BLOCK *****
  3.  * Version: MPL 1.1/GPL 2.0/LGPL 2.1
  4.  *
  5.  * The contents of this file are subject to the Mozilla Public License Version
  6.  * 1.1 (the "License"); you may not use this file except in compliance with
  7.  * the License. You may obtain a copy of the License at
  8.  * http://www.mozilla.org/MPL/
  9.  *
  10.  * Software distributed under the License is distributed on an "AS IS" basis,
  11.  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
  12.  * for the specific language governing rights and limitations under the
  13.  * License.
  14.  *
  15.  * The Original Code is Mozilla Communicator client code, released
  16.  * March 31, 1998.
  17.  *
  18.  * The Initial Developer of the Original Code is
  19.  * Netscape Communications Corporation.
  20.  * Portions created by the Initial Developer are Copyright (C) 1998-1999
  21.  * the Initial Developer. All Rights Reserved.
  22.  *
  23.  * Contributor(s):
  24.  *   Daniel Veditz <dveditz@netscape.com>
  25.  *   Samir Gehani <sgehani@netscape.com>
  26.  *
  27.  * Alternatively, the contents of this file may be used under the terms of
  28.  * either the GNU General Public License Version 2 or later (the "GPL"), or
  29.  * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
  30.  * in which case the provisions of the GPL or the LGPL are applicable instead
  31.  * of those above. If you wish to allow use of your version of this file only
  32.  * under the terms of either the GPL or the LGPL, and not to allow others to
  33.  * use your version of this file under the terms of the MPL, indicate your
  34.  * decision by deleting the provisions above and replace them with the notice
  35.  * and other provisions required by the GPL or the LGPL. If you do not delete
  36.  * the provisions above, a recipient may use your version of this file under
  37.  * the terms of any one of the MPL, the GPL or the LGPL.
  38.  *
  39.  * ***** END LICENSE BLOCK ***** */
  40.  
  41. #include <stdio.h>
  42. #include <string.h>
  43. #include <assert.h>
  44. #ifdef XP_MAC
  45. #include <stdlib.h>
  46. #else
  47. #include <malloc.h>
  48. #endif
  49.  
  50. #define PR_ASSERT         assert
  51. #define PR_Malloc         malloc
  52. #define PR_Free           free
  53. #define PR_FREEIF(x)      do { if (x) free(x); } while(0)
  54. #define PL_strfree        free
  55. #define PL_strcmp         strcmp
  56. #define PL_strdup         strdup
  57. #define PL_strcpy         strcpy
  58. #define PL_strlen         strlen
  59.  
  60. #define PR_Open(a,b,c)    fopen((a),(b)) // XXX Ignores mode
  61. #define PR_Read(f,d,n)    fread((d),1,(n),(f))
  62. #define PR_Write(f,s,n)   fwrite((s),1,(n),(f))
  63. #define PR_Close          fclose
  64. #define PR_Seek           fseek
  65. #define PR_Delete         remove
  66.  
  67. #ifdef __cplusplus
  68. #define PR_BEGIN_EXTERN_C       extern "C" {
  69. #define PR_END_EXTERN_C         }
  70. #else
  71. #define PR_BEGIN_EXTERN_C   
  72. #define PR_END_EXTERN_C  
  73. #endif
  74.  
  75. #if defined(XP_MAC)
  76. #define PR_EXTERN(__type)       extern __declspec(export) __type
  77. #define PR_PUBLIC_API(__type)   __declspec(export) __type
  78. #elif defined(XP_WIN)
  79. #define PR_EXTERN(__type)       extern _declspec(dllexport) __type
  80. #define PR_PUBLIC_API(__type)   _declspec(dllexport) __type
  81. #else /* XP_UNIX */
  82. #define PR_EXTERN(__type)       extern __type
  83. #define PR_PUBLIC_API(__type)   __type 
  84. #endif
  85.  
  86. #define PR_CALLBACK
  87. #define PR_STATIC_CALLBACK(__x) static __x
  88.  
  89. #define NS_STATIC_CAST(__type, __ptr)      ((__type)(__ptr))
  90.  
  91. #define PRFileDesc          FILE
  92. typedef long                PRInt32;
  93. typedef PRInt32             PROffset32;
  94. typedef unsigned long       PRUint32;
  95. typedef short               PRInt16;
  96. typedef unsigned short      PRUint16;
  97. typedef char                PRBool;
  98. typedef unsigned char       PRUint8;
  99. typedef PRUint8             PRPackedBool;
  100.  
  101. #define PR_TRUE             1
  102. #define PR_FALSE            0
  103.  
  104. #define INVALID_SXP   -2
  105. #define NON_SXP       -1
  106. #define VALID_SXP     1
  107. #define MATCH 0
  108. #define NOMATCH 1
  109. #define ABORTED -1
  110.  
  111. #define PR_RDONLY     "rb"
  112. #define PR_SEEK_SET   SEEK_SET
  113. #define PR_SEEK_END   SEEK_END
  114.  
  115. #define NS_WildCardValid(a)       NON_SXP
  116. #define NS_WildCardMatch(a,b,c)   PR_FALSE
  117.  
  118. #define MOZ_DECL_CTOR_COUNTER(x)
  119. #define MOZ_COUNT_CTOR(x)
  120. #define MOZ_COUNT_DTOR(x)
  121.